<template>
  <div class="slot-children">
    <!-- 默认插槽，name属性值默认为default -->
    <slot text="DefaultText" :count="10"></slot>

    <!-- 具名插槽，name不会作为props向上传递 -->
    <slot name="slot-name" text="NameText" :count="20"></slot>
  </div>
</template>

<script>
import {defineComponent} from 'vue';

export default defineComponent({
  name: 'SlotPropsChildren',
  data() {
    return {
      message: '子组件'
    };
  }
});
</script>

<style scoped>
.slot-children {
  width: 470px;
  background: pink;
}
</style>